/* GUI CONVERTED from ececrp3a.p (converter v1.75) Mon Aug 14 12:26:09 2000 */
/* ececrp3a.p - ECN STRUCTURE REPORT SUB-ROUTINE                              */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                        */
/* All rights reserved worldwide.  This is an unpublished work.               */
/* web convert ececrp3a.p (converter v1.00) Mon Oct 06 14:21:49 1997 */
/* web tag in ececrp3a.p (converter v1.00) Mon Oct 06 14:18:04 1997 */
/*K0M7*/ /*V8#ConvertMode=WebReport                            */
/*V8:ConvertMode=Report                                                       */
/* REVISION: 7.4          LAST EDIT: 04/20/95    MODIFIED BY: QZL *H0D4 */
/* REVISION: 8.6          LAST EDIT: 10/08/97    MODIFIED BY: mzv *K0M7 */
/* REVISION: 8.6          LAST EDIT: 05/29/98    MODIFIED BY: *K1R6* A.Shobha */
/* REVISION: 8.6      LAST MODIFIED: 01/28/99    BY: *K1Z2* Santhosh Nair */
/* REVISION: 9.1      LAST MODIFIED: 08/14/00    BY: *N0KW* Jacolyn Neder     */

/*GUI preprocessor directive settings */
&SCOPED-DEFINE PP_GUI_CONVERT_MODE REPORT

     {mfdeclre.i}
/*K1R6 /*K0M7*/ {wbrp02.i} */

   define shared variable ecmnbr like ecm_nbr.
/*K1Z2** BEGIN DELETE **
 * define shared variable wkfl_no as integer.
 * define shared variable maxwkfl as integer.
 * define shared workfile ecd1bom field ecd1bom_par like bom_parent.
 *K1Z2** END DELETE */
/*K1Z2*/ define shared temp-table ecd1bom
/*K1Z2*/                    field ecd1bom_par like bom_parent.
     define buffer ecd1det for ecd1_det.

     for each ecd1bom exclusive-lock :
        delete ecd1bom.
     end.

     for each ecd1_det no-lock where ecd1_det.ecd1_nbr = ecmnbr
     break by ecd1_par:
        if first-of(ecd1_par) and not can-find(first
        ecd1det where ecd1det.ecd1_nbr = ecmnbr
        and ecd1det.ecd1_comp = ecd1_det.ecd1_par) then do:
           create ecd1bom.
           assign ecd1bom_par = ecd1_par.
/*K1Z2** BEGIN DELETE **
 *          wkfl_no = wkfl_no + 1.
 *          if wkfl_no > maxwkfl then do:
 *         {mfmsg.i 5671 2}
 *         return.
 *          end.
 *K1Z2** END DELETE  */
        end.
     end.
/*K1R6 /*K0M7*/ {wbrp04.i}*/
